########################################################################################
### Replication file for Congressional Representation by Petition:                   ###
### Assessing the Voices of the Voteless in a Comprehensive New Database, 1789-1949  ###
###                                                                                  ###
### Authors: Maggie Blackhawk, Daniel Carpenter, Tobias Resch and Benjamin Schneer   ###
###                                                                                  ###
### File: readme.txt                                                                 ###
########################################################################################

################################
# TABLE OF CONTENTS: DATA SETS #
################################

1) petitions.RData -- main petitions database, V 1.0
2) CPD.dta -- petitions data used just for regressions
3) tdata_prva_final.RData -- classifications for test set
4) us_pop.RData -- interpolated US population data from census


######################
# DATA SET CITATIONS #
######################

Journals of Congress. https://memory.loc.gov/ammem/amlaw/lwjrnl.html (accessed July 25, 2020).

United States Congressional Serial Set. Distributed by HathiTrust (https://www.hathitrust.org/datasets). https://catalog.hathitrust.org/Record/6228203, https://catalog.hathitrust.org/Record/9946748, https://catalog.hathitrust.org/Record/9946749, https://catalog.hathitrust.org/Record/9946750, https://catalog.hathitrust.org/Record/9946751, https://catalog.hathitrust.org/Record/9946752, https://catalog.hathitrust.org/Record/9980022, https://catalog.hathitrust.org/Record/9980023, https://catalog.hathitrust.org/Record/9988490, https://catalog.hathitrust.org/Record/9989679, https://catalog.hathitrust.org/Record/9990842, https://catalog.hathitrust.org/Record/9990860, https://catalog.hathitrust.org/Record/9990861, https://catalog.hathitrust.org/Record/9990862, https://catalog.hathitrust.org/Record/9990863, https://catalog.hathitrust.org/Record/9990889, https://catalog.hathitrust.org/Record/9990890, https://catalog.hathitrust.org/Record/10826635, https://catalog.hathitrust.org/Record/100947625 (accessed July 25, 2020).

Manson, Steven, Jonathan Schroeder, David Van Riper, and Steven Ruggles. IPUMS National Historical Geographic Information System: Version 14.0 [Database]. Minneapolis, MN: IPUMS. 2019. http://doi.org/10.18128/D050.V14.0

###########################
# TABLE OF CONTENTS: CODE #
###########################

1) contours_replication1.R -- Creates plots and descriptive statistics from congressional petitions database (CPD).
2) contours_replication2.R -- Analyzes topic classification performance for CPD.
3) contours_replication3.do -- Regression models and effect plots for women and native american petitioning.
4) additional_functions.R -- Reference file containing an additional R function used in other replication programs.

################################
# INSTRUCTIONS FOR REPLICATION #
################################

- Unzip folder
- Set paths in Stata code and R code to correct directory locations
- Execute code in following order: (1) contours_replication1.R (2) contours_replication2.R (3) contours_replication3.do
- Note that figures and tables are output to the folder "figs"


################################
# BASE SOFTWARE DEPENDENCIES   #
################################

- STATA 15
- R 4.0